package com.itasura.ehcache.entity;

import lombok.Getter;
import lombok.Setter;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.io.Serializable;

/**
 * @author sailor wang
 * @date 2018/11/12 5:59 PM
 * @description
 */
@Setter
@Getter
@Entity(name = "t_product")
public class Product implements Serializable {
    private static final long serialVersionUID = 8960789285211703371L;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;
    private String name;
    private String code;

    public Product() {
    }

    public Product(String name, String code) {
        this.name = name;
        this.code = code;
    }
}